<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>我的简历</title>
    <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/bootstrap-icons/1.8.0/font/bootstrap-icons.min.css">
    <style>
        :root {
            --primary-color: #3370ff;
            --background-color: #f5f7fa;
            --card-bg-color: #ffffff;
            --border-color: #e0e0e0;
            --text-primary: #303133;
            --text-secondary: #606266;
            --text-light: #909399;
            --success-color: #67c23a;
            --warning-color: #ff9900;
            --border-radius: 8px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
            background-color: var(--background-color);
            color: var(--text-primary);
            line-height: 1.5;
            font-size: 14px;
            max-width: 375px;
            margin: 0 auto;
            min-height: 100vh;
            height: 100%;
            position: relative;
        }

        .app-container {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            background-color: var(--background-color);
            padding-bottom: 70px;
        }

        /* Header */
        .page-header {
            height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: var(--card-bg-color);
            position: relative;
            box-shadow: 0 1px 2px rgba(0,0,0,0.05);
            z-index: 10;
        }

        .page-title {
            font-size: 17px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .back-button {
            position: absolute;
            left: 15px;
            font-size: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: none;
            border: none;
            color: var(--text-primary);
            cursor: pointer;
        }

        /* Resume List */
        .resume-list {
            padding: 16px;
        }

        .resume-card {
            background-color: var(--card-bg-color);
            border-radius: var(--border-radius);
            padding: 16px;
            margin-bottom: 16px;
            position: relative;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }

        .resume-card.default {
            border-left: 4px solid var(--primary-color);
        }

        .resume-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 12px;
        }

        .resume-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
        }

        .default-badge {
            font-size: 12px;
            background-color: var(--primary-color);
            color: white;
            padding: 2px 8px;
            border-radius: 10px;
            margin-left: 8px;
        }

        .resume-actions {
            display: flex;
            align-items: center;
        }

        .action-icon {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
            background: none;
            border: none;
            font-size: 18px;
            cursor: pointer;
        }

        .resume-info {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
        }

        .resume-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            margin-right: 12px;
            object-fit: cover;
        }

        .resume-details {
            flex: 1;
        }

        .resume-name {
            font-size: 15px;
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

        .resume-meta {
            font-size: 13px;
            color: var(--text-light);
        }

        .resume-meta i {
            margin-right: 4px;
        }

        .resume-content {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 12px;
        }

        .resume-tag {
            font-size: 12px;
            color: var(--text-secondary);
            background-color: var(--background-color);
            padding: 4px 8px;
            border-radius: 4px;
            display: flex;
            align-items: center;
        }

        .resume-tag i {
            margin-right: 4px;
            font-size: 12px;
            color: var(--primary-color);
        }

        .resume-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-top: 12px;
            border-top: 1px solid var(--border-color);
        }

        .resume-stats {
            display: flex;
            color: var(--text-light);
            font-size: 12px;
        }

        .stat-item {
            display: flex;
            align-items: center;
            margin-right: 16px;
        }

        .stat-item i {
            margin-right: 4px;
        }

        .view-btn {
            height: 32px;
            padding: 0 12px;
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: var(--border-radius);
            font-size: 13px;
            cursor: pointer;
            display: flex;
            align-items: center;
        }

        .view-btn i {
            margin-right: 4px;
        }

        /* Context Menu */
        .context-menu {
            position: absolute;
            top: 48px;
            right: 16px;
            background-color: var(--card-bg-color);
            border-radius: var(--border-radius);
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            z-index: 100;
            min-width: 120px;
            display: none;
        }

        .context-menu.show {
            display: block;
        }

        .menu-item {
            padding: 12px 16px;
            font-size: 14px;
            color: var(--text-primary);
            cursor: pointer;
        }

        .menu-item:hover {
            background-color: var(--background-color);
        }

        .menu-item.danger {
            color: #ff4d4f;
        }

        /* Empty State */
        .empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 48px 16px;
            text-align: center;
        }

        .empty-icon {
            font-size: 48px;
            color: var(--text-light);
            margin-bottom: 16px;
        }

        .empty-text {
            font-size: 15px;
            color: var(--text-secondary);
            margin-bottom: 24px;
        }

        /* Bottom Actions */
        .bottom-actions {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: var(--card-bg-color);
            padding: 12px 16px;
            box-shadow: 0 -1px 2px rgba(0,0,0,0.05);
            max-width: 375px;
            margin: 0 auto;
        }

        .action-btn {
            width: 100%;
            padding: 12px;
            border-radius: var(--border-radius);
            font-size: 15px;
            font-weight: 500;
            text-align: center;
            cursor: pointer;
            border: none;
            background-color: var(--primary-color);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .action-btn i {
            margin-right: 8px;
        }

        .action-btn:active {
            opacity: 0.9;
            transform: scale(0.98);
        }
    </style>
</head>
<body>
    <div class="app-container">
        <header class="page-header">
            <button class="back-button" onclick="history.back()">
                <i class="bi bi-chevron-left"></i>
            </button>
            <h1 class="page-title">我的简历</h1>
        </header>

        <div class="resume-list">
            <!-- 默认简历 -->
            <div class="resume-card default">
                <div class="resume-header">
                    <div class="resume-title">
                        校招实习简历
                        <span class="default-badge">默认</span>
                    </div>
                    <div class="resume-actions">
                        <button class="action-icon" onclick="toggleMenu('menu1')">
                            <i class="bi bi-three-dots-vertical"></i>
                        </button>
                        <div id="menu1" class="context-menu">
                            <div class="menu-item">编辑名称</div>
                            <div class="menu-item">分享简历</div>
                            <div class="menu-item danger">删除简历</div>
                        </div>
                    </div>
                </div>
                <div class="resume-info">
                    <img src="../img/user-avatar.jpg" alt="头像" class="resume-avatar">
                    <div class="resume-details">
                        <div class="resume-name">张同学</div>
                        <div class="resume-meta">
                            <i class="bi bi-mortarboard"></i>
                            北京大学 · 计算机科学与技术
                        </div>
                    </div>
                </div>
                <div class="resume-content">
                    <div class="resume-tag">
                        <i class="bi bi-mortarboard"></i>
                        教育经历：1
                    </div>
                    <div class="resume-tag">
                        <i class="bi bi-briefcase"></i>
                        实习经历：1
                    </div>
                    <div class="resume-tag">
                        <i class="bi bi-code-square"></i>
                        项目经历：1
                    </div>
                    <div class="resume-tag">
                        <i class="bi bi-star"></i>
                        技能特长：6
                    </div>
                </div>
                <div class="resume-footer">
                    <div class="resume-stats">
                        <div class="stat-item">
                            <i class="bi bi-eye"></i>
                            30次浏览
                        </div>
                        <div class="stat-item">
                            <i class="bi bi-calendar"></i>
                            2023.10.15更新
                        </div>
                    </div>
                    <button class="view-btn" onclick="location.href='resume-detail.html'">
                        <i class="bi bi-eye"></i>
                        查看
                    </button>
                </div>
            </div>

            <!-- 普通简历 -->
            <div class="resume-card">
                <div class="resume-header">
                    <div class="resume-title">社招全职简历</div>
                    <div class="resume-actions">
                        <button class="action-icon" onclick="toggleMenu('menu2')">
                            <i class="bi bi-three-dots-vertical"></i>
                        </button>
                        <div id="menu2" class="context-menu">
                            <div class="menu-item">设为默认</div>
                            <div class="menu-item">编辑名称</div>
                            <div class="menu-item">分享简历</div>
                            <div class="menu-item danger">删除简历</div>
                        </div>
                    </div>
                </div>
                <div class="resume-info">
                    <img src="../img/user-avatar.jpg" alt="头像" class="resume-avatar">
                    <div class="resume-details">
                        <div class="resume-name">张同学</div>
                        <div class="resume-meta">
                            <i class="bi bi-mortarboard"></i>
                            北京大学 · 计算机科学与技术
                        </div>
                    </div>
                </div>
                <div class="resume-content">
                    <div class="resume-tag">
                        <i class="bi bi-mortarboard"></i>
                        教育经历：1
                    </div>
                    <div class="resume-tag">
                        <i class="bi bi-briefcase"></i>
                        实习经历：2
                    </div>
                    <div class="resume-tag">
                        <i class="bi bi-code-square"></i>
                        项目经历：3
                    </div>
                    <div class="resume-tag">
                        <i class="bi bi-star"></i>
                        技能特长：8
                    </div>
                </div>
                <div class="resume-footer">
                    <div class="resume-stats">
                        <div class="stat-item">
                            <i class="bi bi-eye"></i>
                            15次浏览
                        </div>
                        <div class="stat-item">
                            <i class="bi bi-calendar"></i>
                            2023.12.05更新
                        </div>
                    </div>
                    <button class="view-btn" onclick="location.href='resume-detail.html'">
                        <i class="bi bi-eye"></i>
                        查看
                    </button>
                </div>
            </div>

            <!-- 更多简历可以继续添加 -->
        </div>

        <!-- 底部操作栏 -->
        <div class="bottom-actions">
            <button class="action-btn" onclick="location.href='resume-edit.html'">
                <i class="bi bi-plus-lg"></i>
                创建新简历
            </button>
        </div>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 右上角菜单显示/隐藏
            window.toggleMenu = function(menuId) {
                const menu = document.getElementById(menuId);
                menu.classList.toggle('show');
            };

            // 点击其他地方关闭菜单
            document.addEventListener('click', function(event) {
                const menus = document.querySelectorAll('.context-menu');
                const actionButtons = document.querySelectorAll('.action-icon');
                
                let isActionButton = false;
                actionButtons.forEach(btn => {
                    if (btn.contains(event.target)) {
                        isActionButton = true;
                    }
                });
                
                if (!isActionButton) {
                    menus.forEach(menu => {
                        menu.classList.remove('show');
                    });
                }
            });

            // 为菜单项添加点击事件
            document.querySelectorAll('.menu-item').forEach(item => {
                item.addEventListener('click', function() {
                    const action = this.textContent.trim();
                    const card = this.closest('.resume-card');
                    
                    if (action === '删除简历') {
                        if (confirm('确定要删除这份简历吗？')) {
                            card.remove();
                        }
                    } else if (action === '设为默认') {
                        // 移除其他卡片的默认标记
                        document.querySelectorAll('.resume-card').forEach(c => {
                            c.classList.remove('default');
                            const badge = c.querySelector('.default-badge');
                            if (badge) badge.remove();
                        });
                        
                        // 添加默认标记到当前卡片
                        card.classList.add('default');
                        const title = card.querySelector('.resume-title');
                        if (!title.querySelector('.default-badge')) {
                            const badge = document.createElement('span');
                            badge.className = 'default-badge';
                            badge.textContent = '默认';
                            title.appendChild(badge);
                        }
                        
                        // 更新菜单项
                        card.querySelector('.context-menu').innerHTML = `
                            <div class="menu-item">编辑名称</div>
                            <div class="menu-item">分享简历</div>
                            <div class="menu-item danger">删除简历</div>
                        `;
                    } else if (action === '编辑名称') {
                        const title = card.querySelector('.resume-title');
                        const currentName = title.childNodes[0].nodeValue.trim();
                        const newName = prompt('请输入简历名称', currentName);
                        
                        if (newName && newName.trim() !== '') {
                            title.childNodes[0].nodeValue = newName + ' ';
                        }
                    } else if (action === '分享简历') {
                        alert('分享功能正在开发中，敬请期待！');
                    }
                    
                    // 关闭菜单
                    document.querySelectorAll('.context-menu').forEach(menu => {
                        menu.classList.remove('show');
                    });
                });
            });
        });
    </script>
</body>
</html> 